package com.ruoyi.paper.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.paper.mapper.ExamOptionMapper;
import com.ruoyi.paper.domain.ExamOption;
import com.ruoyi.paper.service.IExamOptionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 试题选项Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
@Service
public class ExamOptionServiceImpl implements IExamOptionService 
{
    @Autowired
    private ExamOptionMapper examOptionMapper;

    /**
     * 查询试题选项
     * 
     * @param optionId 试题选项主键
     * @return 试题选项
     */
    @Override
    public ExamOption selectExamOptionByOptionId(String optionId)
    {
        return examOptionMapper.selectExamOptionByOptionId(optionId);
    }

    /**
     * 查询试题选项列表
     * 
     * @param examOption 试题选项
     * @return 试题选项
     */
    @Override
    public List<ExamOption> selectExamOptionList(ExamOption examOption)
    {
        return examOptionMapper.selectExamOptionList(examOption);
    }

    /**
     * 新增试题选项
     * 
     * @param examOption 试题选项
     * @return 结果
     */
    @Override
    public int insertExamOption(ExamOption examOption)
    {
        return examOptionMapper.insertExamOption(examOption);
    }

    /**
     * 修改试题选项
     * 
     * @param examOption 试题选项
     * @return 结果
     */
    @Override
    public int updateExamOption(ExamOption examOption)
    {
        return examOptionMapper.updateExamOption(examOption);
    }

    /**
     * 批量删除试题选项
     * 
     * @param optionIds 需要删除的试题选项主键
     * @return 结果
     */
    @Override
    public int deleteExamOptionByOptionIds(String optionIds)
    {
        return examOptionMapper.deleteExamOptionByOptionIds(Convert.toStrArray(optionIds));
    }

    /**
     * 删除试题选项信息
     * 
     * @param optionId 试题选项主键
     * @return 结果
     */
    @Override
    public int deleteExamOptionByOptionId(String optionId)
    {
        return examOptionMapper.deleteExamOptionByOptionId(optionId);
    }
}
